<?php
	define("QG_PATH","QuickGraph/");
	function QuickGraph_Chart($type="line",$width=600,$height=400)
	{
		if(!file_exists(QG_PATH."QuickGraph.php"))
		{
			echo "<strong>Error:</strong> Main QuickGraph class not found (".QG_PATH."QuickGraph.php".").";
			return false;
		}
		require_once(QG_PATH."QuickGraph.php");
		if (!file_exists(QG_PATH.$type.".graph.php"))
		{
			echo "<strong>Error:</strong> <em>".$type."</em> graph library not found (Path: &quot;".QG_PATH."&quot;).";
			return false;
		}
		include_once(QG_PATH.$type.".graph.php");
		$type = "QG_".$type;
		$class =& new $type($width,$height);
		return $class;
	}
?>